<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/template/templateAdmin.xhtml">
	<ui:define name="content">
		<f:loadBundle basename="properties.messages" var="msg" />
		<f:view locale="#{language.locale}">
		<center class="ViewUsers">
			<h:form>
			<br/>
				<div class="createRepTitle">#{msg.viewAllUsers}</div><br/>
				<center>
					<h:panelGrid columns="3">
						#{msg.search}:&nbsp; <h:inputText id="searchName" value="#{userDtoListController.searchText}">
							<f:ajax event="keyup" render="table"></f:ajax>
						</h:inputText>
						<h:outputText value="&nbsp;&nbsp;&nbsp;&nbsp;"></h:outputText>
					</h:panelGrid>
				</center>
				<br />
				<center >
				<div style="overflow-y:auto;">
					<h:dataTable id="table" value="#{userDtoListController.userList}" var="u">


						<h:column id="userName">
							<f:facet name="header">
								<h:outputText value="#{msg.username}"></h:outputText>
							</f:facet>
							<h:selectBooleanCheckbox value="#{u.selected}"/>
						#{u.name}
						<f:facet name="  ">
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="&nbsp;&nbsp;&nbsp;&nbsp;"></h:outputText>
							</f:facet>
						</h:column>


						<h:column>
							<f:facet name="header">
								<h:outputText value=" "></h:outputText>
							</f:facet>
						</h:column>
						<h:column id="userType">
							<f:facet name="header">
								<h:outputText value="#{msg.userType}" />
							</f:facet>
						#{msg[u.type]}
				</h:column>

						
					</h:dataTable>
					</div>
					</center>
					<br/>
					<center>
					<h:commandButton class="selectRepositoryButton" value="#{msg.save}" action="#{userDtoListController.invalidate}" >
							</h:commandButton>
							</center>
				
			</h:form>
		</center>
		</f:view>
	</ui:define>
</ui:composition>
</html>